<%--
  Created by IntelliJ IDEA.
  User: 11091
  Date: 2019/10/12
  Time: 14:17
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%
    String path = request.getContextPath();
    String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort() + path + "/";
%>
<html>
<head>
    <base href="<%=basePath%>">
    <meta charset="utf-8">
    <title>Title</title>
</head>
<body>
<a href="stu/list">查询所有</a>
<input type="text" name="queryById" id="queryById" placeholder="请输入学号">
<button type="button" id="queryId">查询</button><br>


<script src="static/js/1.11.3/jquery-1.11.3.js"></script>
<script>
    $(function(){
        $('#queryId').on('click',function(){
            var id = $('#queryById').val;
            $.get('stu/query/id/'+id,function(msg){
                alert(msg.sname+"/"+msg.sex);
            })
        })
    })
</script>
</body>
</html>
